package priv.dajie.tzzq.bot.model;

import java.util.ArrayList;
import java.util.HashMap;

public class SteamPackItems extends ArrayList<SteamPackItem> {

    private HashMap<String, SteamPackItem> map = null;

    public synchronized HashMap<String, SteamPackItem> getMap(){
        if(map == null){
            map = new HashMap<>();
            for(SteamPackItem packItem : this){
                if(packItem.getTradeTime()==null)
                    map.put(packItem.getSteamName(), packItem);
            }
        }
        return map;
    }

}
